<template>
	<div>
		<el-form ref="form" :model="form" label-width="80px">

			<el-form-item label="类型Id">
				<el-input v-model="form.DictTypeId"></el-input>
			</el-form-item>
			<el-form-item label="状态">
				<el-input v-model="form.DictName"></el-input>
			</el-form-item>
			<el-form-item label="值">
				<el-input v-model="form.DictValue"></el-input>
			</el-form-item>
			<el-form-item label="信息">
				<el-input v-model="form.DictDesc"></el-input>
			</el-form-item>
			<el-form-item label="是否可用">
				<el-input v-model="form.IsDelete"></el-input>
			</el-form-item>

			<el-form-item>
				<el-button type="primary" @click="onSubmit">立即添加</el-button>
				<el-button type="primary" @click="quxiao">取消</el-button>
			</el-form-item>
		</el-form>

	</div>
</template>

<script>
	import DictinfoApi from '@/api/DictinfoApi.js'
	export default {
		data() {
			return {
				form: {
					DictTypeId: '',
					DictName:'',
					DictValue:'',
					DictDesc:'',
					IsDelete:""
					

				}
			}
		},
		methods: {
			onSubmit() {
				DictinfoApi.add(this.form).then(res => {
					if (res.code == 1) {
						console.log(res);
						this.$message({
							message: "添加成功",
							type: "success"
						})
						this.$emit('close')
					}
				})
			},
			quxiao() {
				this.$emit('close')
			}
		}
	}
</script>

<style>
</style>